package com.xinruke.hostels.common.annotations;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @ClassName ValidValue
 * @CreateDate 2019/7/15
 * @Author FengXinQiang
 * @Version V1.0.0.0
 * @Decription 有效值
 */
@Constraint(validatedBy = ValidValueValidator.class)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidValue {
    String message() default "数值无效";

    String value() default "";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
